	 <?php echo form_open('admin/news_cat/request'); ?><!-- start title -->
		<div class="title corners_top" style="float:left;width:300px;"><h6 id="tables" > Danh sách loại tin tức
</h6></div>

        <!-- end title -->
			<div class="proccess_bar">

    <ul class="menu_bar">
    <li> <a href="<?php echo base_url(); ?>admin/news_cat/create" ><span class="new-1"> </span>New</a></li>

     <li>
  <?php  $data = array('name' => 'delete', 'value' => '','class'=>'delete-1', 'id' => 'delete');

  echo form_submit($data);


?>   Delete</li>
    </ul>



 </div>
        <div class="content">


        <table cellspacing="1" class="tablesorter">


        <?php
			if (is_array($result) )

	{

		//title
		echo '<thead>';
		echo '<tr>';

			echo '<th width="50">';
			$data = array(
				'name'        => 'checkall',
				'id'          => 'checkall',
			  );
			echo '&nbsp;',form_checkbox($data ),'&nbsp;All';
		echo '</th>';

   // echo '<th width="70">Active</th>';

    echo '<th width="50">'.$this->lang->line('code').'</th>';

		echo '<th width="250">Tiêu đề</th>';



		echo '<th width="100">Trạng thái</th>';

		 echo '<th width="150" >Ngày Cập nhật</th>';

		  echo '<th width="70" >Chức năng</th>';


	//	echo '<th width="100">Info</th>';

		echo '</tr>';

		echo '</thead>';

		echo '<tbody>';

		//print

		foreach ($result as $row)

		{

			echo '<tr>';



			//action

			echo '<td>';
			$data = array(
    'name'        => 'checkbox1[]',
    'id'          => 'checkbox1[]',
	'value'=>  $row['cat_id']
  );

			echo form_checkbox($data, $row['cat_id']);

			echo '&nbsp;';

		//	echo anchor('admin/user/update/'.$row['cat_id'], 'Edit');

			echo '</td>';






      //Code

			echo '<td>';

     			 echo $row['cat_id'];

			echo '</td>';



			//name

			echo '<td >';

     			 echo  html_entity_decode($row['cat_name'], ENT_QUOTES, 'UTF-8');
			echo '</td >';
		      //Active
			echo '<td >';
		if($row['cat_status'] == 1)
			echo 'hiển thị';
		else
			echo 'ẩn';

		echo '</td>';

		echo '<td >';

				echo date('d-m-Y h:i',strtotime($row['cat_modify']));

		echo '</td>';


			echo '<td>
				<!--<a href="javascript:();"><img src="'.base_url() .'public/images/admin/zoom.png" width="16" height="16" alt="preview" title="preview" /></a>-->';
				echo '<a href="'.base_url().'admin/news_cat/update/'.$row['cat_id'].'"><img src="'.base_url().'public/images/admin/edit.png" width="16" height="16" alt="edit" title="edit" /></a> ';
       			echo '<a href="javascript:deleteRecord(\''.$row['cat_id'].'\',\''.base_url().'admin/news_cat/delete/'.$row['cat_id'].'\');"><img src="'. base_url().'public/images/admin/delete.png" width="16" height="16" alt="delete" title="delete" /></a> <br>';
				echo "<a href='".base_url()."admin/news_type/index/$row[cat_id]'><B> Thêm loại phòng </B></a> <br>";
				echo "<a href='".base_url()."admin/news/index/$row[cat_id]'><B> Thêm căn hộ </B></a> <br>";
			echo "</td>";

		echo '</tr>';

		}
		echo '</tbody>';





		?>

		</table>
        <div class="float_left margin_10_0">
			<a href="javascript:();"><img src="<?php echo base_url(); ?>public/images/admin/edit.png" width="16" height="16" alt="edit" /></a>
        	<a href="javascript:();"><img src="<?php echo base_url(); ?>public/images/admin/delete.png" width="16" height="16" alt="delete" /></a></div>
        <div class="pagination float_right margin_10_0">
        	<?php echo $page; ?></div>
         <?php
		 }
		else
		{

			echo '    <div><a href="javascript:();" title="Succes box" class="box warning corners"><span class="close">&nbsp;</span>Data does not exist</a></div>';

		}
		 ?>
        </div><!-- end title -->

         <?php echo form_close(); ?>